package com.monkey.common;

import com.monkey.bean.Result;
import org.springframework.web.bind.annotation.ExceptionHandler;
import org.springframework.web.bind.annotation.RestControllerAdvice;

@RestControllerAdvice
public class ExceptionAdaptController {

    @ExceptionHandler(value = {RuntimeException.class})
    public Result runtimeException(RuntimeException runtimeException){
        runtimeException.printStackTrace();
        return Result.fail();
    }
}
